package com.zhhq.exception;


import com.zhhq.enums.ResultEnum;

/**
 * 自定义异常类
 * Created by HeChaobin on 2017-05-30.
 */
public class CustomException extends RuntimeException{
    private Integer code;

    public CustomException(ResultEnum resultEnum) {
        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }
}
